---
description:
  Learn how to manage cached data in Apollo Client 3 with garbage collection and cache eviction
  strategies, and gain fine-grained control with the evict method. Read more on the documentation.
---

import { Callout } from '@theguild/components';

# Garbage Collection and Cache Eviction

Apollo Client 3 enables you to selectively remove cached data that is no longer useful. The default
garbage collection strategy of the `gc` method is suitable for most applications, but the `evict`
method provides more fine-grained control for applications that require it.

<Callout type="warning">
  You call these methods directly on the `InMemoryCache` object, not on the `ApolloClient` object.
</Callout>

Please read the
["Garbage collection and cache eviction"](https://apollographql.com/docs/react/caching/garbage-collection)
chapter on Apollo Client documentation.
